package com.blog.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.blog.pojo.dto.UserDTO;
import com.blog.pojo.dto.UserLoginDto;
import com.blog.pojo.entity.User;
import com.google.common.primitives.Longs;

import java.util.List;

public interface UserService extends IService<User> {

    User getByUsername(String username);

    User login(UserLoginDto userLoginDto);

    void register(String username, String password);

    void updatePwd(String newPwd);

    void updateAvatar(String avatarUrl);

    IPage<User> getUserPage(Integer pageNum, Integer pageSize, Long id, String username, Long status);

    void deleteUser(Long id);

    void deleteUsers(List<Long> ids);

    void updateUserInfo(UserDTO userDTO);

    Long getUserCount();
}
